home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Opus5.5 / LhexInstall.lha / InstallOpus_e < prev   
Text File  |  1999-05-12  |  35KB  |  1,393 lines

  1. ; Script to install Directory Opus version 5.5
  2. ;
  3. ; Directory Opus Install Version $VER: Install-Opus 5.5  (27.08.96)
  4. ; COPYRIGHT ©1996 GP SOFTWARE, AUSTRALIA
  5. ; note uses Opus<Alt-Shift>5
  6. ; now installs new catalogs if they are on the disk.
  7.  
  8.  
  9. (onerror
  10.     (makeassign "DOPUSDEST" (safe))    
  11. )
  12.  
  13. (complete 0)
  14.  
  15. ;
  16. ;check user has Dos 2
  17. ;
  18.  
  19. (set #DOSTYPE (/ (getversion) 65536))
  20. (if
  21.     (NOT (>= #DOSTYPE 37))
  22.     (abort "Directory Opus 5 requires AmigaDOS 2.04 or higher."
  23.         " If you have an earlier version of AmigaDOS you must purchase an upgrade before using Opus 5.")
  24. )
  25.  
  26.  
  27. (set @default-dest "work:")
  28.  
  29. (set #Dopus_prog "DOpus5:DirectoryOpus")
  30. (set #Loadwb "C:LoadWb")
  31. (set #Loadwb_old "C:LoadWb_old")
  32. (set #Has_loadwb_old 0)
  33. (set #Has_loaddb 0)
  34. (set #Inst_choice 0)
  35. (set #Changed 0)
  36. (set #Inst_core 0)
  37.  
  38. (set #DName1 "AMINET31")
  39. (set #DName2 "AMINET31")
  40. (set #Disk1_Name "AMINET31:Opus5.5/")
  41. (set #Disk2_Name "AMINET31:Opus5.5/")
  42. (set #TLArchive    "MWB_DOpus8c.lha")
  43. (set #CatalogFiles "CatFiles.lha")
  44. (set #Is_update 0)
  45.  
  46. (set #DOpus_Dest (getassign "DOpus5" "a"))
  47. (set #O_DOpus_Dest (getassign "DOpus5" "a"))
  48. (set #Go "Proceed")
  49. (set #Skip "Skip this part")
  50.  
  51.  
  52.  
  53. ;
  54. ; Procedure signal
  55. ; inc ase Opus is re-installed. The notification on the modules
  56. ; directory can cause problems so signal Opus to turn off notifications
  57.  
  58. (procedure signal_opus
  59.  
  60.     (set #Want_disk 1)
  61.     (get_disk)
  62.     (set #Sigs (tackon #Disk1_Name "dopusmsg"))
  63.     (if (exists #Sigs (noreq))
  64.         (run (cat #Sigs " DOPUS.1 \"command set notify off\""))
  65.     )
  66. )
  67.  
  68.  
  69. ;
  70. ; Procedure get_lhex 
  71. ;
  72.  
  73.  
  74. (procedure get_lhex
  75.  
  76.     (if ( = (exists "ram:lhex" (noreq)) 0)
  77.         (
  78.         (set #Want_disk 1)
  79.         (get_disk)
  80.         (working #Title_msg
  81.             "Reading the Install disk for Directory Opus files.")
  82.         (copyfiles (source (tackon #Disk1_Name "lhex")) (dest "ram:"))
  83.         )
  84.     )
  85. )
  86.  
  87. ;
  88. ; Procedure get_disk 
  89. ; get the correct disk for a program
  90. ;
  91.  
  92. (procedure get_disk
  93.  
  94.     (if (= #Want_disk 1)
  95.         (set #DiskName #DName1)
  96.         (set #DiskName #DName2)
  97.     )
  98.     (askdisk
  99.         (prompt #Title_msg
  100.             "\nPlease insert the disk labeled \""#DiskName"\".")
  101.         (help "Insert this disk in a floppy drive to continue the installation.")
  102.         (assigns)
  103.         (dest #DiskName)
  104.     )
  105.     (set #Current_disk #Want_disk)
  106. )
  107.  
  108. ;
  109. ; Procedure install_arexx  ;
  110. ; From Leo Davidson collection.
  111. ;
  112.  
  113. (procedure install_arexx
  114.  
  115.     (set #Title_msg "Installation of ARexx Archive.\n\n")
  116.     (get_lhex)
  117.     (if     (askbool (prompt #Title_msg
  118.                 "We have also included an archive of ARexx scripts and other add-ons for Opus "
  119.                 "by various users. Most of the scripts will require some further "
  120.                 "installation after this script has been run.\n\n"
  121.                 "Do you wish to install the ARexx Archives?\n")
  122.             (help "Yes do it! It is great!")
  123.         )
  124.         (
  125.         (set #Changed 1)
  126.         (set #Want_disk 2)
  127.         (get_disk)
  128.         (if    (> (+ (database "total-mem")) 1000000)
  129.             (
  130.             (working #Title_msg
  131.                 "Copying Files.")
  132.             (copyfiles (source (tackon #Disk2_Name "ARexx.lha")) (dest "ram:"))
  133.             (set #SRC "ram:")
  134.             )
  135.             (set #SRC #Disk2_Name)
  136.         )
  137.         (working #Title_msg
  138.             "Dearchiving and installing the ARexx scripts.\n\n"
  139.             "More patience..\n"
  140.             "Won't take too long.")
  141.             
  142.         (run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"ARexx.lha"))
  143.         (delete "ram:ARexx.lha" (safe))
  144.         (run "c:protect DOPUSDEST:ARexx/#? +s")
  145.  
  146.         (message #Title_msg
  147.             "The ARexx scripts are now installed. Please read "
  148.             "the top of the scripts for further information on "
  149.             "what they do and how to use them.\n\n"
  150.             "The scripts are in \"DOpus5:Arexx\", some add-on modules are in "
  151.             "\"DOpus5:Storage/Modules\", and some of the add-ons have AmigaGuides "
  152.             "which are in \"DOpus5:Help\". There are also some new icons in "
  153.             "\"DOpus5:Icons\".\n"
  154.             "\nTo activate modules you must move them to \"DOpus5:Modules\" and "
  155.             "re-start Opus."
  156.         )
  157.         )
  158.     )
  159. )
  160.  
  161. ;
  162. ; Procedure install_mwbextras ;
  163. ; MWB_DOpus_8_Install 1.0 (11.8.96)
  164. ; Install originally written by Leo Davidson.
  165. ;
  166.  
  167. (procedure install_mwbextras
  168.  
  169.     (set #Title_msg "MWB_DOpus v8.0 Installation.\n\n")
  170.     (get_lhex)
  171.     ;- Introductory message 
  172.  
  173.     (if    (askbool (prompt #Title_msg
  174.                 "Developed by Trevor Morris and Leo Davidson\n\n"
  175.                 "MagicWorkbench toolbar icons and backdrops "
  176.                 "for Directory Opus 5.5 (and other programs).\n\n"
  177.                 "These provide a very nice set of images for"
  178.                 " toolbars and icons whether or not you use MagicWorkbench."
  179.                 "\n\nDo you wish to install these on your system?")
  180.             (help "Yes do it! It is great!")
  181.         )
  182.         (
  183.         (set #Changed 1)
  184.         (set #Want_disk 2)
  185.         (get_disk)
  186.         (if    (> (+ (database "total-mem")) 1000000)
  187.             (
  188.             (working #Title_msg
  189.                 "Copying Files.")
  190.             (copyfiles (source (tackon #Disk2_Name #TLArchive)) (dest "ram:"))
  191.             (set #SRC "ram:")
  192.             )
  193.             (set #SRC #Disk2_Name)
  194.         )
  195.         (working #Title_msg
  196.             "Dearchiving the MWB Archive.\n\n"
  197.             "Ever thought of taking up Chess?....\n\n"
  198.             "Ahh, wouldn't a \"Power\" Amiga be great!")
  199.         (run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "(tackon #SRC #TLArchive)))
  200.         (delete (tackon "ram:" #TLArchive) (safe))
  201.  
  202.         (run "cd ram:MWB8")
  203.  
  204.     ;- Set where to do the install to
  205.  
  206.         (set #Target "DOPUSDEST:")
  207.  
  208.     
  209.     ;- Back-up the old Images drawer (if exists) and copy new images
  210.  
  211.         (if (= (exists "DOPUSDEST:Images" (noreq)) 2) 
  212.             (
  213.             (set #Tmp_msg "\n\nYour old \"Images\" drawer can be backup before the new images are installed.")
  214.             (set images_exist 1)
  215.             )
  216.             (
  217.             (set #Tmp_msg " ")
  218.             (set images_exist 0)
  219.             )
  220.         )
  221.  
  222.         (if     (askbool (prompt #Title_msg
  223.                     "The new toolbar images will be copied"
  224.                     " to your \"Dopus5:Images\" drawer."
  225.                     #Tmp_msg)
  226.                 (choices #Go #Skip)
  227.                 (default 1)
  228.                 (help "This part installs all the toolbar images.")
  229.             )
  230.             ( ; yes 
  231.             (if images_exist
  232.                 (
  233.                 (set #Bkup 1)
  234.                 (set #New_name (cat "Images" #Bkup))
  235.                 (while     (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
  236.                     (
  237.                     (set #Bkup (+ #Bkup 1))
  238.                     (set #New_name (cat "Images" #Bkup))
  239.                     )
  240.                 )
  241.                 (if     (askbool (prompt #Title_msg
  242.                         "Do you wish to backup your current"
  243.                         " \"Images\" directory or overwrite it"
  244.                         " with the new images?\n\n"
  245.                         "Your old directory would be backed up as "#New_name".")
  246.                     (choices "Yes - Backup" "No - Overwrite")
  247.                     (default 1)
  248.                     (help "If in doubt select Yes.")
  249.                     )
  250.                     (; backup Images
  251.                     (rename (tackon #Target "Images") (tackon #Target #New_name))
  252.                     )
  253.                 )
  254.                 )
  255.             )
  256.  
  257.             (copyfiles
  258.                 (source "ram:MWB8/Images")
  259.                 (dest (tackon #Target "Images"))
  260.                 (all)
  261.                 (optional force)
  262.                 )
  263.             )
  264.         )
  265.  
  266.     ;- Copy the Colours guide
  267.     
  268.         (if    (askbool (prompt #Title_msg
  269.                     "We have provided some simple shortcuts which"
  270.                     " allow you to quickly set MagicWorkbench colours.\n\n"
  271.                     "Do you wish to install this \"Colours\" directory?")
  272.                 (default 1)
  273.                 (help "This part installs a MWB Colors directory.")
  274.             )
  275.             (copyfiles
  276.                 (source "ram:MWB8/Colors")
  277.                 (dest (tackon #Target "Colors"))
  278.                 (all)
  279.                 (infos)
  280.                 (optional force)
  281.             )
  282.         )
  283.             
  284.     ;- Copy the new icons (for programs, files, etc)
  285.     
  286.         (if    (askbool (prompt #Title_msg
  287.                     "The old DOpus5 file icons will be replaced by "
  288.                     "MagicWorkbench versions.\n\n"
  289.                     "Note: In case you have set some tooltypes in it, "
  290.                     "the main DirectoryOpus icon will be left alone. You "
  291.                     "should replace it manually as described in the help "
  292.                     "guide which is installed later.")
  293.                 (choices #Go #Skip)
  294.                 (default 1)
  295.                 (help "This part installs all the program and file icons.")
  296.             )
  297.             (copyfiles 
  298.                 (source "ram:MWB8/DOpus_Icons")
  299.                 (dest #Target)
  300.                 (all)
  301.                 (optional force)
  302.             )
  303.         )
  304.     
  305.     ;- Copy the Help guide
  306.     
  307.         (if    (askbool (prompt #Title_msg
  308.                     "An AmigaGuide about MWB_DOpus 8, including hints & tips "
  309.                     "will be copied to \"DOpus5:Help\".")
  310.                 (choices #Go #Skip)
  311.                 (default 1)
  312.                 (help "This part installs the help guide.")
  313.             )
  314.             (copyfiles
  315.                 (source "ram:MWB8/Help/MWB_DOpus8_Help.guide")
  316.                 (dest (tackon #Target "Help"))
  317.                 (infos)
  318.                 (optional force)
  319.             )
  320.         )
  321.     
  322.     ;- Copy the fonts 
  323.     
  324.         (if    (askbool (prompt #Title_msg
  325.                     "Some extra fonts will be copied to \"Fonts:\".\n"
  326.                     "They are not essential to use MWB_DOpus.\n\n"
  327.                     "These fonts are:\n"
  328.                     "\"P0T-NOoDLE\",\n"
  329.                     "\"P0T-Prop\",\n"
  330.                     "\"PolarSmall\", and,\n"
  331.                     "\"PolarSmall-Prop\".")
  332.                 (choices #G